package com.example.picturebacked.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.picturebacked.model.dto.user.UserQueryRequest;
import com.example.picturebacked.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.picturebacked.model.vo.LoginUserVO;
import com.example.picturebacked.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author lbt
 * @description 针对表【user(用户)】的数据库操作Service
 * @createDate 2025-08-19 15:32:41
 */
public interface UserService extends IService<User> {

    Long userRegister(String userAccount, String userPassword, String checkPassword);

    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    LoginUserVO loginUserVO(User user);

    List<UserVO> getUserVOList(List<User> userList);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    UserVO getUserVO(User user);

    User getLoginUser(HttpServletRequest request);

    boolean removeById(HttpServletRequest request);

    String getEncryptPassword(String userPassword);

    boolean isAdmin(User user);
}
